package com.github_Dididipapa.shortlink.project.feign;

import com.github_Dididipapa.shortlink.project.common.result.R;
import com.github_Dididipapa.shortlink.project.config.FeignConfig;
import com.github_Dididipapa.shortlink.project.remote.resp.IPLocationRespDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @description: To be defined
 * @author: dididi_papa
 * @email: mitis1624087624@gmail.com
 * @date: 2025/09/19  14:53
 */
@FeignClient(
        name = "short-link-gateway",
        url = "localhost:88",
        contextId = "thirdPartyFeign",
        configuration = FeignConfig.class
)
public interface ThirdPartyFeign {

    @GetMapping("/api/short-link/third-party/v1/location/{ip}")
    R<IPLocationRespDTO> getLocation(@PathVariable("ip") String ip);
}
